<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>CSS 动画 - 重复执行</title>
  <style>
    body {
      padding: 0 40px;
      color: #333;
    }

    img {
      width: 200px;

      /* 控制动画执行的次数，设置数值即可， infinite 无限次播放*/
      /* animation: rotate 1s linear infinite; */

      animation-name: rotate;
      animation-timing-function: linear;
      animation-duration: 1s;
      animation-iteration-count: infinite;
    }

    @keyframes rotate {
      from {
        transform: rotate(0deg);
      }

      to {
        transform: rotate(360deg);
      }
    }
  </style>
</head>
<body>
  <h3>重复执行</h3>
  <p>设置动画重复执行的次数，默认只执行 1 次。</p>

  <img src="./images/rotate.png" alt="">
</body>
</html>